package com.c2soft.nepalcmx.controller;

import java.util.ArrayList;
import java.util.List;

import lombok.extern.log4j.Log4j2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.c2soft.nepalcmx.command.BrokeUserCommand;
import com.c2soft.nepalcmx.services.BrokeUserService;

@Log4j2
@Controller
public class BrokeUserController {

	@Autowired
	private BrokeUserService brokeUserService;
	
	@RequestMapping(value = "/userList",method=RequestMethod.GET, headers = "Accept=application/json")
	
	public @ResponseBody List<BrokeUserCommand> getUsers(@RequestParam("brokeId") String brokeId) {
		List<BrokeUserCommand> userList=brokeUserService.getUserList(brokeId);
		
		return userList;
	}
}
